<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>跳转提示</title>
<style type="text/css">
*{padding:0;margin:0;}
body{background: rgb(79, 138, 208);font-family:'微软雅黑';color:#fff;font-size:16px;padding:20px;}
.system-message{margin:0 auto;width:auto}
.system-message h1{font-size:40px;font-weight:normal;line-height:60px;margin-bottom:12px}
.system-message .jump{padding-top:10px;margin-bottom:20px}
.system-message .jump a{color:#333;}
.system-message .success,.system-message .error{line-height:1.8em;font-size: 22px;word-break:break-all;word-wrap:break-word;overflow-y:auto;max-height:400px;}
.system-message .detail{font-size: 12px; line-height: 20px; margin-top: 12px; display:none}
#wait {font-size:30px;}
#btn-stop,#btn-now,#href{display: inline-block;margin-right: 5px;
    font-size: 15px;line-height: 18px;text-align: center;
    vertical-align: middle;cursor: pointer;border: 0 none;
    background-color: white;padding: 6px 12px;color: rgb(79, 138, 208);
    border-radius: 3px;font-weight: bold;
    border-color: transparent;text-decoration:none;
}
#href{margin-right: 0px;}
#btn-stop:hover,#href:hover{color: rgba(79, 138, 208,0.9);background: rgba(255,255,255,0.9);}
</style>
</head>
<body>
<div class="system-message">
    <h1>恭喜您!</h1>
    <p class="error"><?php echo($message); ?></p>
    <p class="detail"></p>
    <p class="jump" id="jump-message">
        <?php if($waitSecond>=0):?>
        <b id="wait"><?php echo($waitSecond); ?></b> 秒后页面将自动跳转
        <?php endif;?>
    </p>
    <div>
        <?php if($waitSecond>=0):?>
        <a id="btn-now" href="<?php echo($jumpUrl); ?>">立即跳转</a>
        <button id="btn-stop" type="button" onclick="stop()">停止跳转</button>
        <?php endif;?>
        <a id="href" href="<?php echo homeUrl();?>">返回首页</a>
    </div>
</div>
<script type="text/javascript">
(function(){
    var wait = document.getElementById('wait'),href = document.getElementById('href').href;
    if(wait.innerHTML<0) return;
    if(href==location.href) {
        document.getElementById('jump-message').innerHTML='';
        document.getElementById('btn-now').style.display='none';
        document.getElementById('btn-stop').style.display='none';
        return;
    }
    var interval = setInterval(function(){
        var time = --wait.innerHTML;
        if(time <= 0) {
                location.href = href;
                clearInterval(interval);
        };
    }, 1000);
    window.stop = function (){clearInterval(interval);};
})();
</script>
</body>
</html>
